<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>错误 - MarsPay支付系统</title>
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap Icons -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css" rel="stylesheet">
    <style>
        :root {
            --primary-color: #ffe60f;
            --primary-dark: #ffd700;
            --primary-light: #fff8c4;
            --text-dark: #333;
        }
        
        body {
            background: linear-gradient(180deg, #fff 0%, #f8f8f8 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }
        
        .error-container {
            max-width: 500px;
            width: 100%;
        }
        
        .error-card {
            background: white;
            border-radius: 24px;
            padding: 60px 40px;
            text-align: center;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
            animation: shake 0.6s ease;
            position: relative;
            overflow: hidden;
        }
        
        .error-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #ff4d4f, #ff7875);
        }
        
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
            20%, 40%, 60%, 80% { transform: translateX(8px); }
        }
        
        .error-icon-wrapper {
            width: 120px;
            height: 120px;
            background: linear-gradient(135deg, #ff4d4f, #ff7875);
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 30px;
            box-shadow: 0 10px 30px rgba(255, 77, 79, 0.3);
        }
        
        .error-icon {
            font-size: 3.5rem;
            color: white;
        }
        
        .error-title {
            font-size: 2.2rem;
            font-weight: bold;
            color: #ff4d4f;
            margin-bottom: 15px;
        }
        
        .error-message {
            color: #666;
            margin-bottom: 30px;
            padding: 20px;
            background: linear-gradient(135deg, #fff1f0 0%, #fff 100%);
            border-radius: 12px;
            border-left: 4px solid #ff4d4f;
            text-align: left;
            font-size: 0.95rem;
            line-height: 1.6;
        }
        
        .action-buttons {
            display: grid;
            gap: 15px;
        }
        
        .btn-primary-custom {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
            color: var(--text-dark);
            border: none;
            padding: 14px 40px;
            font-size: 1.1rem;
            font-weight: 600;
            border-radius: 50px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(255, 230, 15, 0.4);
            text-decoration: none;
            display: inline-block;
        }
        
        .btn-primary-custom:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 230, 15, 0.5);
            color: var(--text-dark);
        }
        
        .btn-secondary-custom {
            background: white;
            color: var(--text-dark);
            border: 2px solid #e8e8e8;
            padding: 14px 40px;
            font-size: 1.1rem;
            font-weight: 500;
            border-radius: 50px;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-block;
        }
        
        .btn-secondary-custom:hover {
            border-color: var(--primary-color);
            background: var(--primary-light);
            color: var(--text-dark);
        }
    </style>
</head>
<body>
    <div class="error-container">
        <div class="error-card">
            <div class="error-icon-wrapper">
                <i class="bi bi-x-lg error-icon"></i>
            </div>
            <h1 class="error-title">操作失败</h1>
            <div class="error-message">
                <strong>❌ 错误信息：</strong><br>
                <span th:text="${error}">发生了一个错误</span>
            </div>
            <div class="action-buttons">
                <a href="/" class="btn-primary-custom">
                    <i class="bi bi-house"></i> 返回首页
                </a>
                <a href="javascript:history.back()" class="btn-secondary-custom">
                    <i class="bi bi-arrow-left"></i> 返回上一页
                </a>
            </div>
        </div>
    </div>

    <!-- Bootstrap JS -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
